/**
  ETFRoot project, Anyang Normal University && IMP-CAS
  \class ETFTrackManager
  \brief a manager class holding the fitted tracks and trackers. NOTE that this
  is a singleton class
  \author SUN Yazhou, asia.rabbit@163.com
  \since 2021-11-09
  \date 2021-11-09 last modified
  \attention
  changelog
  <table>
  <tr>  <th>Date         <th>Author      <th>Description                   </tr>
  <tr>  <td>2021-11-09   <td>Asia Sun    <td>file created                  </tr>
  </table>

  \copyright Copyright (c) 2021 Anyang Normal U. && IMP-CAS with LGPLv3 LICENSE
*/

#ifndef ETFTrackManager_h
#define ETFTrackManager_h

#include <Rtypes.h>
#include "ETFVTrackManager.h"

class ETFPreTaTracker;
class ETFPostTaTracker;
class ETFPostMagTracker;
class ETFGlobalTracker;

class ETFTrackManager : public ETFVTrackManager{
public:
  static ETFTrackManager *Instance();
  virtual ~ETFTrackManager();

  ETFPreTaTracker *GetPreTaTracker() const{ return fPreTaTracker; }
  ETFPostTaTracker *GetPostTaTracker() const{ return fPostTaTracker; }
  ETFPostMagTracker *GetPostMagTracker() const{ return fPostMagTracker; }
  ETFGlobalTracker *GetGlobalTracker() const{ return fGlobalTracker; }

  virtual void Draw(); ///< draw the tracks
  virtual void Write(); ///< write all the tracks to file
  virtual void Map(); ///< do the overall tracking
  virtual void Map3D(); ///< do the overall 3D tracking
  virtual void Register(); ///< register tracks to main TTree
  virtual void Reset(); ///< reset for next event
  virtual void Print();
  virtual void SetDebug(bool opt = true);

  ClassDef(ETFTrackManager, 0);

protected:
  ETFTrackManager();

  static ETFTrackManager *fInstance;
  ETFPreTaTracker *fPreTaTracker;
  ETFPostTaTracker *fPostTaTracker;
  ETFPostMagTracker *fPostMagTracker;
  ETFGlobalTracker *fGlobalTracker;
};

#endif
